package org.example.commons.constant;

import com.fasterxml.jackson.databind.ObjectMapper;

import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.util.Date;

/**
 * 通用常量信息
 * @author bothin
 */
public class Constants {
    /**
     * 微信通行二维码 key
     */
    public static final String WX_QR_CODE_KEY = "wx_qr_code:";

    /**
     * 资源映射路径 前缀
     */
    public static final String RESOURCE_PREFIX = "/profile";

    /**
     * 查询的默认开始时间
     */
    public static final Date SEARCH_DEFAULT_DATE = Date.from(LocalDateTime.of(1980, 1, 1, 0, 0)
            .atZone(ZoneId.systemDefault()).toInstant());

    /**
     * 用于格式化日期
     */
    public static final SimpleDateFormat SIMPLE_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

    /**
     * 用于json序列化
     */
    public static final ObjectMapper MAPPER = new ObjectMapper();
}
